package cn.yunhe.service.impl;

import cn.yunhe.dao.IOrdersDao;
import cn.yunhe.pojo.Orders;
import cn.yunhe.service.IOrdersService;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrdersServiceImpl implements IOrdersService {

    @Autowired
    IOrdersDao ordersDao;

    public List<Orders> queryAll(Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        return ordersDao.queryAll();
    }

    public Orders queryOrdersById(String id) {
        return ordersDao.queryOrdersById(id);
    }
}
